package com.bajiao.entity.discountRule;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.bajiao.common.aspect.annotation.Dict;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

/**
 * @Description: 店铺优惠规则
 * @Author: FanJq
 * @Date:   2025-01-13
 * @Version: V1.0
 */
@Data
@TableName("tb_discount_rule")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="tb_discount_rule对象", description="店铺优惠规则")
public class DiscountRule {

	/**主键*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "主键", required = true, position = 0)
	private String id;
	/**店铺id*/
	@Excel(name = "店铺id", width = 15)
    @ApiModelProperty(value = "店铺id", required = true, position = 10)
	@Dict(dictTable = "tb_store", dicCode = "id", dicText = "title")
	private String storeId;
	/**权重*/
	@Excel(name = "权重", width = 15)
    @ApiModelProperty(value = "权重", required = true, position = 20)
	private Integer seq;
	/**满#减门槛*/
	@Excel(name = "满#减门槛", width = 15)
    @ApiModelProperty(value = "满#减门槛", required = true, position = 30)
	private BigDecimal meet;
	/**优惠金额*/
	@Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额", required = true, position = 40)
	private BigDecimal discountAmount;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", required = true, position = 50)
	private Date createTime;
	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间", required = true, position = 60)
	private Date updateTime;
}
